package camelinaction;

import io.netty.channel.ChannelHandler;
import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
import org.apache.camel.component.netty4.DefaultChannelHandlerFactory;
import org.springframework.stereotype.Component;

//import javax.inject.Named;

//@Named
@Component
public class DecoderFactory extends DefaultChannelHandlerFactory {
    @Override
    public ChannelHandler newChannelHandler() {
        return  new LengthFieldBasedFrameDecoder(1024*1024,8,4);
    }
}
